using MicroMsg.Common.Utils;
using MicroMsg.Manager;
using MicroMsg.Scene.ChatRoom;
using MicroMsg.Scene.Image;
using MicroMsg.Scene.Video;
using MicroMsg.Scene.Voice;
using System;
using System.Collections.Generic;
namespace MicroMsg.Scene
{
	public class ServiceCenter
	{
		private const string TAG = "ServiceCenter";
		public static NetSceneAuth sceneAuth;
		public static NetSceneNewInit sceneNewInit;
		public static NetSceneNewSync sceneNewSync;
		public static NetSceneNewReg sceneNewReg;
		public static NetSceneReg sceneReg;
		public static NetSceneGetUserName sceneGetUserName;
		public static NetSceneBindOpMobileForReg sceneBindOpMobileForReg;
		public static NetSceneResetPwd sceneResetPwd;
		public static NetSceneSearchContact sceneSearchContact;
		public static NetSceneVerifyUser sceneVerifyUser;
		public static NetSceneBatchGetHeadImg sceneBatchGetHeadImg;
		public static NetSceneBindQQ sceneBindQQ;
		public static NetSceneBindOpMobile sceneBindMobile;
		public static UploadVoiceService sceneUploadVoice;
		public static DownloadVoiceService sceneDownloadVoiceService;
		public static NetSceneSendInviteEmail sceneSendInviteEmail;
		public static NetSceneSendMsg sceneSendMsg;
		public static NetSceneDownloadImg sceneDownloadImg;
		public static DownloadVideoService sceneDownloadVideo;
		public static UploadVideoService sceneUploadVideo;
		public static CreateChatRoomService sceneCreateChatRoomService;
		public static AddChatRoomMemberService sceneAddChatRoomMemberService;
		public static DelChatRoomMemberService sceneDelChatRoomMemberService;
		public static GroupCardService sceneGroupCardService;
		public static NetSceneSendFeedback sceneSendFeedback;
		public static NetSceneSendVerifyEmail sceneSendVerifyEmail;
		public static NetSceneUploadMContact sceneNetUploadMContact;
		public static NetSceneGetMFriend sceneNetGetMFriend;
		public static MobileContactMgr mobileContactMgr;
		public static NetSceneGetVerifyImage sceneGetVerifyImage;
		public static NetScenePushChannelReg scenePushChannelReg;
		public static NetScenePushChannelUnReg scenePushChannelUnReg;
		public static NetSceneLogout sceneLogout;
		public static NetSceneDownloadAppAttach sceneDownloadAppAttach;
		private static NetSceneCrashReport _sceneCrashReport;
		public static NetSceneGetUpdateInfo sceneGetUpdateInfo;
		public static NetSceneChatTyping sceneChatTyping;
		public static NetSceneUploadImage sceneSendImg;
		public static NetSceneUploadHDHeadImg sceneUploadHDHeadImg;
		public static NetSceneDownloadHDHeadImg sceneDownloadHDHeadImg;
		public static NetSceneGeneralSet sceneGeneralSet;
		public static NetSceneBatchGetContactProfile sceneBatchGetContactProfile;
		public static NetSceneBatchGetContact sceneBatchGetContact;
		public static NetSceneExpose sceneExpose;
		public static NetSceneGetPSMImg sceneGetPSMImg;
		public static NetSceneGetQRCode sceneGetQRCode;
		public static NetSceneSendCard sceneSendCard;
		public static NetSceneClientPerfReport sceneClientPerfReport;
		public static SessionMgr sessionMgr;
		public static QConversationMgr qconversationMgr;
		public static BConversationMgr bconversationMgr;
		public static BannerManager bannerManager;
		public static ConversationMgr conversationMgr;
		public static StatReportMgr statReportMgr;
		public static Dictionary<string, object> mDictAppStageShouldSave;
		public static PushNotifyMgr pushNotifyMgr;
		public static ConfigMgr configMgr;
		public static VUserInfoMgr vuserInfoMgr;
		public static ClientPerfReportMgr perfReportMgr;
		public static WorkThread bgWorker;
		public static NetSceneCrashReport sceneCrashReport
		{
			get
			{
				if (ServiceCenter._sceneCrashReport == null)
				{
					ServiceCenter._sceneCrashReport = new NetSceneCrashReport();
				}
				return ServiceCenter._sceneCrashReport;
			}
		}
		public static void init()
		{
			Profiler.setPoint("ServiceCenterStart");
			CrashLogMgr.SendCrashInfo();
			Profiler.setPoint("CrashReport");
			GConfigMgr.init();
			ConfigMgr.init();
			Profiler.setPoint("ConfigMgr");
			ServiceCenter.asyncExecInit();
			StorageMgr.init();
			AccountMgr.init();
			Profiler.setPoint("AccountMgrInit");
			HeadImageMgr.init();
			FMsgMgr.init();
			MobileContactMgr.init();
			SnsMsgMgr.init();
			SnsAsyncMgr.init();
			GetPackageListMgr.checkInit();
			Profiler.setPoint("MgrInit");
			ServiceCenter.qconversationMgr = new QConversationMgr();
			ServiceCenter.bconversationMgr = new BConversationMgr();
			ServiceCenter.conversationMgr = new ConversationMgr();
			ServiceCenter.bannerManager = new BannerManager();
			Profiler.setPoint("NewMgr");
			NetSceneSyncCheck.initSyncCheck();
			ServiceCenter.sceneAuth = new NetSceneAuth();
			ServiceCenter.sceneNewInit = new NetSceneNewInit();
			ServiceCenter.sceneNewSync = new NetSceneNewSync();
			ServiceCenter.sceneReg = new NetSceneReg();
			ServiceCenter.sceneNewReg = new NetSceneNewReg();
			ServiceCenter.sceneGetUserName = new NetSceneGetUserName();
			ServiceCenter.sceneBindOpMobileForReg = new NetSceneBindOpMobileForReg();
			ServiceCenter.sceneResetPwd = new NetSceneResetPwd();
			ServiceCenter.sceneSearchContact = new NetSceneSearchContact();
			ServiceCenter.sceneVerifyUser = new NetSceneVerifyUser();
			ServiceCenter.sceneBatchGetHeadImg = new NetSceneBatchGetHeadImg();
			ServiceCenter.sceneBindQQ = new NetSceneBindQQ();
			ServiceCenter.sceneBindMobile = new NetSceneBindOpMobile();
			ServiceCenter.sceneUploadVoice = new UploadVoiceService();
			ServiceCenter.sceneDownloadVoiceService = new DownloadVoiceService();
			ServiceCenter.sceneSendInviteEmail = new NetSceneSendInviteEmail();
			ServiceCenter.sceneSendMsg = new NetSceneSendMsg();
			ServiceCenter.sceneDownloadImg = new NetSceneDownloadImg();
			ServiceCenter.sceneCreateChatRoomService = new CreateChatRoomService();
			ServiceCenter.sceneAddChatRoomMemberService = new AddChatRoomMemberService();
			ServiceCenter.sceneDelChatRoomMemberService = new DelChatRoomMemberService();
			ServiceCenter.sceneGroupCardService = new GroupCardService();
			ServiceCenter.sceneSendFeedback = new NetSceneSendFeedback();
			ServiceCenter.sceneSendVerifyEmail = new NetSceneSendVerifyEmail();
			ServiceCenter.sceneGetVerifyImage = new NetSceneGetVerifyImage();
			ServiceCenter.sceneChatTyping = new NetSceneChatTyping();
			ServiceCenter.sceneSendImg = new NetSceneUploadImage();
			ServiceCenter.sceneDownloadVideo = new DownloadVideoService();
			ServiceCenter.sceneUploadVideo = new UploadVideoService();
			ServiceCenter.scenePushChannelReg = new NetScenePushChannelReg();
			ServiceCenter.scenePushChannelUnReg = new NetScenePushChannelUnReg();
			ServiceCenter.pushNotifyMgr = new PushNotifyMgr();
			ServiceCenter.sceneNetUploadMContact = new NetSceneUploadMContact();
			ServiceCenter.sceneNetGetMFriend = new NetSceneGetMFriend();
			ServiceCenter.sceneLogout = new NetSceneLogout();
			ServiceCenter.sceneGetUpdateInfo = new NetSceneGetUpdateInfo();
			ServiceCenter.sceneUploadHDHeadImg = new NetSceneUploadHDHeadImg();
			ServiceCenter.sceneDownloadHDHeadImg = new NetSceneDownloadHDHeadImg();
			ServiceCenter.sceneGeneralSet = new NetSceneGeneralSet();
			ServiceCenter.sceneBatchGetContactProfile = new NetSceneBatchGetContactProfile();
			ServiceCenter.sceneBatchGetContact = new NetSceneBatchGetContact();
			ServiceCenter.sceneExpose = new NetSceneExpose();
			ServiceCenter.sceneGetPSMImg = new NetSceneGetPSMImg();
			ServiceCenter.sceneGetQRCode = new NetSceneGetQRCode();
			ServiceCenter.sceneSendCard = new NetSceneSendCard();
			ServiceCenter.sceneClientPerfReport = new NetSceneClientPerfReport();
			ServiceCenter.sceneDownloadAppAttach = new NetSceneDownloadAppAttach();
			Profiler.setPoint("NewScene");
			ServiceCenter.sessionMgr = new SessionMgr();
			ServiceCenter.statReportMgr = new StatReportMgr();
			ServiceCenter.vuserInfoMgr = new VUserInfoMgr();
			ServiceCenter.mobileContactMgr = new MobileContactMgr();
			ServiceCenter.perfReportMgr = new ClientPerfReportMgr();
			AccountMgr.loginStartupNotify();
			Profiler.setPoint("ServiceCenterEnd");
		}
		public static void uninit()
		{
			AccountMgr.uninit();
		}
		public static void asyncExecInit()
		{
			if (ServiceCenter.bgWorker == null)
			{
				ServiceCenter.bgWorker = new WorkThread();
			}
		}
		public static bool asyncExec(Action action_0)
		{
			return action_0 != null && ServiceCenter.bgWorker.add_job(action_0);
		}
	}
}
